//
// Created by masaikk on 2021/4/29.
//

#ifndef CT_MAP1_H
#define CT_MAP1_H

#include <map>
#include <iostream>
#include <string>
using namespace std;

class Map1{
private:
    map<int,string> map;
public:
    void addElem(){
        pair<int,string> p1(1,"lbb");
        pair<int,string>p2(2,"sda");
        map.insert(p1);
        map.insert(p2);
    }
    void showElems(){
        for(pair<int,string> i:this->map){
            printf("%d %s \n",i.first,i.second.c_str());
        }
    }
    void findElem(int i){
//        map<int, string>::iterator p=this->map.find(1);
//        printf("%d %s \n",p.first,p.second.c_str());
    }
    void execute1(){
        this->addElem();
        this->showElems();
    }
};

#endif //CT_MAP1_H
